package com.example.entity;

import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;

/**
 * 用户实体类
 * 
 * @author example
 * @since 2024-01-01
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
public class User implements Serializable {
    
    private static final long serialVersionUID = 1L;
    
    private Long id;
    
    private String name;
    
    private String username;
    
    private String email;
    
    private String phone;
    
    private String website;
    
    @JsonProperty("company")
    private Company company;
    
    @JsonProperty("address")
    private Address address;
    
    /**
     * 公司信息
     */
    @Data
    @NoArgsConstructor
    @AllArgsConstructor
    public static class Company implements Serializable {
        private String name;
        private String catchPhrase;
        private String bs;
    }
    
    /**
     * 地址信息
     */
    @Data
    @NoArgsConstructor
    @AllArgsConstructor
    public static class Address implements Serializable {
        private String street;
        private String suite;
        private String city;
        private String zipcode;
        private Geo geo;
        
        @Data
        @NoArgsConstructor
        @AllArgsConstructor
        public static class Geo implements Serializable {
            private String lat;
            private String lng;
        }
    }
} 